//
//  DateHeaderReusableView.m
//  iosMathExample
//
//  Created by 李群 on 2021/9/18.
//

#import "DateHeaderReusableView.h"
#import "ConstantUI.h"

@interface DateHeaderReusableView (){
    UILabel *yearLabel;
}
@end

@implementation DateHeaderReusableView

- (void)updateHeaderViewWithSection:(NSInteger)section{
    yearLabel.text = [NSString stringWithFormat:@"%ld", (long)section + 1970];
}

- (instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        yearLabel = [[UILabel alloc]initWithFrame:CGRectMake(16, 0, 150, CGRectGetHeight(frame))];
        yearLabel.font = [UIFont boldSystemFontOfSize:kFont_Size_24];
        yearLabel.textColor = [UIColor blackColor];
        yearLabel.textAlignment = NSTextAlignmentLeft;
        [self addSubview:yearLabel];
    }
    return self;
}

@end
